#ifndef EVENT_ACTOR
#define EVENT_ACTOR
#include <iostream>
#include <vector>
#include <pthread.h>

class Event;
class EventActor
{
    public:
        void Notify( Event *e );
    private:
        pthread_mutex_t mQueueMutex;
        pthread_cond_t  mQueueCond;
        void ReadyForNextEvent();
        void WaitForEvent();

    protected:
        std::vector<Event*> mEventQueue;
        virtual void ProcessEventQueue()=0;
        void Run();
};
#endif //EVENT_ACTOR
